import React from 'react'
import { CapsuleTabs } from 'antd-mobile'
import {
  Form,
  Input,
  Button,
  Dialog,
  TextArea,
  DatePicker,
  Selector,
  Slider,
  Stepper,
  Switch,
} from 'antd-mobile'
// import request from '../../utils/request'
// import { loginApi } from '../../api'
function Index() {
  // const onFinish = async(values) => {
  
  // const {data,code,message}=request.data
  // if(code==200){

  // }
  // }
  return (
    <div>
      <CapsuleTabs>
          <CapsuleTabs.Tab title='账号密码登录' key='fruits'>
          <Form
        layout='horizontal'
        // onFinish={onFinish}
        footer={
          <Button block type='submit' color='primary' size='large'>
            登录
          </Button>
        }
      >
        <Form.Item
          name='userName'
          label='账号'
          rules={[{ required: true, message: '账号不能为空' }]}
        >
          <Input onChange={console.log} placeholder='请输入账号' />
        </Form.Item>
        <Form.Item
          name='password'
          label='密码'
          rules={[{ required: true, message: '密码不能为空' }]}
        >
          <Input onChange={console.log} placeholder='请输入密码' />
        </Form.Item>
       
      </Form>

          </CapsuleTabs.Tab>
          <CapsuleTabs.Tab title='扫码登录' key='vegetables'>
           <img src="https://img1.baidu.com/it/u=16287752,2019165622&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1741194000&t=326a62f6d6c786b923fd50bd0086e3f7" alt="" />
          </CapsuleTabs.Tab>
        </CapsuleTabs>
    </div>
  )
}

export default Index